Skip to content

Conversation

@neotob
Copy link
Collaborator

@neotob neotob commented Dec 22, 2025

No description provided.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 22, 2025

Open in StackBlitz

npm i https://pkg.pr.new/neolution-ch/react-data-table/@neolution-ch/react-data-table@87

commit: f9d5f19


useEffect(() => {
// We can't set these values directly in the useReactDataTableState hook above,
// because the filter would be taken as default value also for the reset function.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@neotob so the idea here is to "rehydrate" the state on mount right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Michele-Masciave yes exactly, so a page reload will keep the previous data

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect I see, LGTM then :-)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know the useEffect is not that beautiful... if you see any other solution, please let me know 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants